package com.jsl.utils21;

import java.io.IOException;
import java.util.Base64;

/**
 * Base64������
 * 
 * @author liyang
 *
 */
public class Base64Util {

    /**
     * Base64编码
     */
    public static String encryptBASE64(byte[] key) {
        return Base64.getEncoder().encodeToString(key);
    }

    /**
     * Base64解码
     */
    public static byte[] decryptBASE64(String key) throws IOException {
        return Base64.getDecoder().decode(key);
    }
}